package icom.acm.util.locker;

public class Password {
	/**
	 * 对DES密码解密
	 * 
	 * @param password
	 *            //DES加密的密码
	 * @return
	 */
	public static String decryptDES(final String password) {
		String jm = null;
		try {
			final DesUtils des = new DesUtils("123456");
			jm = des.decrypt(password);
		} catch (final Exception e) {
			e.printStackTrace();
		} finally {
			return jm;
		}
	}

	/**
	 * 对password进行DES加密
	 * 
	 * @param password //
	 *            对password进行DES加密
	 * @return
	 */
	public static String encryptDES(final String password) {
		String jm = null;
		try {
			final DesUtils des = new DesUtils("123456");
			jm = des.encrypt(password);
		} catch (final Exception e) {
			e.printStackTrace();
		} finally {
			return jm;
		}
	}

	/**
	 * 对字符进行MD5加密
	 * 
	 * @param password
	 *            要加密的字符
	 * @return
	 */
	public static String MD5(final String password) {
		return MD5.toMD5(password);
	}
	
	public static void main(String[] args){
		System.out.println(MD5("1"));
	}
}
